POV-Ray : Newsgroups : povray.general : Disc which is not flat : Re: scale by 0 (was Re: Disc which is not flat) Server Time
7 Aug 2024 11:17:35 EDT (-0400)
  Re: scale by 0 (was Re: Disc which is not flat)  
From:
Date: 3 Dec 2001 10:35:41
Message: <oh6n0uoqibno6v3ighkgd7moo9u6cm0doi@4ax.com>
On Mon, 3 Dec 2001 10:13:54 -0500, "Trevor Quayle" <Tin### [at] hotmailcom>
wrote:

> #macro ScaleIt (s)
>   #local s=s*<1,1,1>
>   scale <#if (s.x=0) 0 #else s.x #end,
>          #if (s.y=0) 0 #else s.y #end,
>          #if (s.z=0) 0 #else s.z #end>
> #end

Excuse me, but ... what is purpose of this macro :-)
You probably want

#macro ScaleIt (s)
   #local s=s+<0,0,0>;
  scale <(s.x=0?1:s.x),(s.y=0?1:s.y),(s.z=0?1:s.z)>
#end

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.